package com.zzs.elm.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import com.zzs.elm.po.Business;
import com.zzs.elm.service.BusinessService;


public class BusinessController {
	
	private final BusinessService businessService = new BusinessService();
	
	public List<Business> listBusinessByOrderTypeId(HttpServletRequest request) throws Exception {
		int orderTypeId = Integer.valueOf(request.getParameter("orderTypeId"));
		return businessService.listBusinessByOrderTypeId(orderTypeId);
	}
	
	public Business getBusinessById(HttpServletRequest request) throws Exception {
		int businessId = Integer.valueOf(request.getParameter("businessId"));
		return businessService.getBusinessById(businessId);
	}

}
